<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js"></script>
</head>

<body>
    <div class="a">123</div>

</body>
<script>
    var time = 123;
    time = setInterval(() => {
        console.log("执行")
    }, 1000);
    time = 90;
    setTimeout(() => {
        clearInterval(time)
    }, 2000)









    
    (function () {
        console.log(interval)
        intervalAlert()
    })()
       var interval = 1;

    function Videostate(ele) {
        $(".a").on("click", function () {
            clearInterval(interval);
            console.log("click", interval)
        })
    }

    function intervalAlert() {
        console.log(interval,"uio")
        clearInterval(interval);
        interval = setInterval(bannerAnimate, 1000)
        Videostate()
    }
    //  intervalAlert()
    function bannerAnimate() {
        console.log("还是走进来了")
        console.log("interval", interval)
    }
</script>

</html>